﻿@if (Menu != null)
{
    <BarStart Class="main-navbar-nav" ElementId="main-navbar-nav">
        @foreach (var menuItem in Menu.Items)
        {        
            var elementId = menuItem.ElementId ?? "MenuItem_" + menuItem.Name.Replace(".", "_");                
            <BarItem Class="@menuItem.CssClass" Disabled="@menuItem.IsDisabled" ElementId="@elementId">
                <BarLink To="@GetNavUrl(menuItem)" Target="new Target(menuItem.Target)">
                    @if (menuItem.Icon != null)
                    {
                        <BarIcon IconName="menuItem.Icon " />
                    }
                    @menuItem.DisplayName    
                </BarLink>
            </BarItem>
        }
    </BarStart>
}
